import orm
import time
def show_orders():
    get_money=0
    lose_money=0
    sum=0
    path='Books_Data.json'
    data_list=orm.read_data(path)
    for data in data_list:
        if data["金额"]>0:
            get_money+=data['金额']
        else:
            lose_money+=data['金额']
        sum+=data['金额']
    print(f'总支出金额:{lose_money}\t总收入金额:{get_money}\t结余金额:{sum}')
def create_order():
    # path='Books_Data.json'
    print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()))

    # project=input("请输入项目:")
    # classify=input("请输入分类(收入/支出):")
    # money=float(input("请输入金额(收入为正/支出为负):"))
    # neworder={'时间': time, '项目': project, '分类': classify, '金额': money}
    # deta_list=orm.read_data(path)
    # print(neworder)
    # print(deta_list)
# if __name__ == '__main__':
    print(create_order())
        


# time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
# print(time)